﻿//-----------------------------------------------------------------------
// <copyright file="ExceptionHelper.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Microsoft.Live.Messenger
{
    using System;
    using System.Diagnostics;

    internal static class ExceptionHelper
    {
        public static Exception CreateArgumentNullException(string param)
        {
            Debug.Assert(!String.IsNullOrEmpty(param));

            return new ArgumentNullException(param);
        }

        public static Exception CreateArgumentOutOfRangeException(string param)
        {
            Debug.Assert(!String.IsNullOrEmpty(param));

            return new ArgumentOutOfRangeException(param);
        }

        public static Exception CreateArgumentException(string message, string param)
        {
            Debug.Assert(!String.IsNullOrEmpty(message));
            Debug.Assert(!String.IsNullOrEmpty(param));

            return new ArgumentException(message, param);
        }

        internal static Exception CreateInvalidOperationException(string message)
        {
            Debug.Assert(!String.IsNullOrEmpty(message));

            return new InvalidOperationException(message);
        }
    }
}
